package tools;

import java.io.File;

public class EncodingDetect {
    public static void main(String[] args) {
        String file = "scripts\\event\\HenesysPQ.js";
        String encode = getJavaEncode(file);
        System.out.println(encode);
    }

    public static String getJavaEncode(String filePath) {
        return getJavaEncode(new File(filePath));
    }

    public static String getJavaEncode(File file) {
        BytesEncodingDetect s = new BytesEncodingDetect();
        return BytesEncodingDetect.javaname[s.detectEncoding(file)];
    }
}
